package demo.bean;

// Generated Jan 16, 2014 7:03:03 PM by Hibernate Tools 4.0.0

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * PgaJoblog generated by hbm2java
 */
@Entity
@Table(name = "pga_joblog", schema = "pgagent")
public class PgaJoblog implements java.io.Serializable {

	private int jlgid;
	private PgaJob pgaJob;
	private char jlgstatus;
	private Date jlgstart;
	private Serializable jlgduration;
	private Set<PgaJobsteplog> pgaJobsteplogs = new HashSet<PgaJobsteplog>(0);

	public PgaJoblog() {
	}

	public PgaJoblog(int jlgid, PgaJob pgaJob, char jlgstatus, Date jlgstart) {
		this.jlgid = jlgid;
		this.pgaJob = pgaJob;
		this.jlgstatus = jlgstatus;
		this.jlgstart = jlgstart;
	}

	public PgaJoblog(int jlgid, PgaJob pgaJob, char jlgstatus, Date jlgstart,
			Serializable jlgduration, Set<PgaJobsteplog> pgaJobsteplogs) {
		this.jlgid = jlgid;
		this.pgaJob = pgaJob;
		this.jlgstatus = jlgstatus;
		this.jlgstart = jlgstart;
		this.jlgduration = jlgduration;
		this.pgaJobsteplogs = pgaJobsteplogs;
	}

	@Id
	@Column(name = "jlgid", unique = true, nullable = false)
	public int getJlgid() {
		return this.jlgid;
	}

	public void setJlgid(int jlgid) {
		this.jlgid = jlgid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "jlgjobid", nullable = false)
	public PgaJob getPgaJob() {
		return this.pgaJob;
	}

	public void setPgaJob(PgaJob pgaJob) {
		this.pgaJob = pgaJob;
	}

	@Column(name = "jlgstatus", nullable = false, length = 1)
	public char getJlgstatus() {
		return this.jlgstatus;
	}

	public void setJlgstatus(char jlgstatus) {
		this.jlgstatus = jlgstatus;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "jlgstart", nullable = false, length = 35)
	public Date getJlgstart() {
		return this.jlgstart;
	}

	public void setJlgstart(Date jlgstart) {
		this.jlgstart = jlgstart;
	}

	@Column(name = "jlgduration")
	public Serializable getJlgduration() {
		return this.jlgduration;
	}

	public void setJlgduration(Serializable jlgduration) {
		this.jlgduration = jlgduration;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgaJoblog")
	public Set<PgaJobsteplog> getPgaJobsteplogs() {
		return this.pgaJobsteplogs;
	}

	public void setPgaJobsteplogs(Set<PgaJobsteplog> pgaJobsteplogs) {
		this.pgaJobsteplogs = pgaJobsteplogs;
	}

}
